Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Nexus links tests #1613

Merged
merged 2 commits into from
Dec 20, 2024
Merged

Add Nexus links tests #1613

merged 2 commits into from
Dec 20, 2024

Conversation

rodrigozhou
Copy link
Contributor

What was changed

Add Nexus links tests

Why?

Checklist

  1. Closes

  2. How was this tested:

  1. Any docs updates needed?

@rodrigozhou rodrigozhou requested a review from bergundy August 29, 2024 17:57
@rodrigozhou rodrigozhou requested a review from a team as a code owner August 29, 2024 17:57
@rodrigozhou rodrigozhou marked this pull request as draft August 29, 2024 18:30
Comment on lines 579 to 675
require.Equal(t, tc.testConfig.Namespace, link.GetWorkflowEvent().GetNamespace())
require.Equal(t, handlerWfID, link.GetWorkflowEvent().GetWorkflowId())
require.NotEmpty(t, link.GetWorkflowEvent().GetRunId())
requireProtoEqual(
t,
&common.Link_WorkflowEvent_EventReference{
EventType: enums.EVENT_TYPE_WORKFLOW_EXECUTION_STARTED,
},
link.GetWorkflowEvent().GetEventRef())
handlerRunID := link.GetWorkflowEvent().GetRunId()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: you could have just used requireProtoEqual on the entire struct.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I cannot because I don't have the handler run id.

@@ -290,10 +298,22 @@ func TestNexusWorkflowRunOperation(t *testing.T) {

nc := tc.newNexusClient(t, service.Name)

link := &common.Link_WorkflowEvent{
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is redundant IMHO since we're already testing adding links from a workflow.

Copy link
Member

@bergundy bergundy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I missed this in the last PR but please mark these functions as experimental in a different PR since this one has to remain a draft until we have a CLI with server 1.26.
https://github.com/temporalio/sdk-go/blob/master/temporalnexus/link_converter.go#L65-L89

@rodrigozhou rodrigozhou force-pushed the rodrigozhou/nexus-test-links branch from a78bfbf to d57a2c5 Compare December 12, 2024 05:14
@rodrigozhou rodrigozhou marked this pull request as ready for review December 12, 2024 05:14
test/nexus_test.go Outdated Show resolved Hide resolved
@rodrigozhou rodrigozhou force-pushed the rodrigozhou/nexus-test-links branch from d57a2c5 to 255cccf Compare December 19, 2024 19:10
@rodrigozhou rodrigozhou force-pushed the rodrigozhou/nexus-test-links branch from df2a7ce to 097e08e Compare December 20, 2024 05:08
@rodrigozhou rodrigozhou force-pushed the rodrigozhou/nexus-test-links branch from 097e08e to a9c78b6 Compare December 20, 2024 06:10
@rodrigozhou rodrigozhou merged commit 380add9 into master Dec 20, 2024
14 checks passed
@rodrigozhou rodrigozhou deleted the rodrigozhou/nexus-test-links branch December 20, 2024 08:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants